<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\SoftDeletes;
use Illuminate\Notifications\Notifiable;
use Watson\Validating\ValidatingTrait;

class WechatArtSource extends Model
{
    use Notifiable;
    use ValidatingTrait;
    protected $table = 'wechat_art_sources';
    //
    protected $fillable = [
        "id"
    ];
    protected $rules = [
//        'name' => 'required|max:200',
    ];
    protected $validationMessages = [
//        'name.required' => '考试名称必填',
//        'name.max' => '考试名称长度不得超过20个字符',
//        'name.unique' => '该考试已经被注册过了'
    ];

    public function contexts()
    {
        return $this->hasMany('App\Models\WechatArticle','sources_id','id')->orderBy('index');
    }
}
